package cn.vplay.controllers;

import cn.vplay.services.SongService;
import com.google.gson.Gson;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @Classname SongController
 * @Description 对Song提供服务:展示,查询等
 * @Date 2020/6/9 2:27 下午
 * @Created by lqj(1724226325@qq.com)
 */
@Controller
@RequestMapping("song/")
public class SongController {
    @Autowired
    private SongService songService;

    @RequestMapping("list")
    @ResponseBody
    public String  getAllSong(){
          return new Gson().toJson(
                  songService.getAllSong()
          ) ;
    }
}
